package com.exam.meituan;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * date:
 * description:
 */
public class Solution105 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int T = scanner.nextInt();
        String base = "MeiTuannauTieMwowwow";
        for (int i = 0; i < T; i++) {
            int k = scanner.nextInt() - 1;
            k %= 20;
            System.out.println(base.charAt(k));
        }
    }
}
